<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title>安平县居民核酸检测信息系统</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/main.css" rel="stylesheet" />
		<link rel="stylesheet" href="layui/css/layui.css"  media="all">
		<script src="layui/layui.js" charset="utf-8"></script>
		<style>
			body{background-color: #F2F2F7;}
          .content{top:20%; bottom: 0; left: 0; right: 0; position: absolute; margin: 0 18px;display:flex;flex-direction:column;}
          .content span{font-size:17px;font-weight: bold;}
          .layui-input{margin:12px 0;height:44px;box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.2);}
          .content label{font-size:15px;color:red; width:100%; margin-bottom:5px;}
          .button {
            background: #009588;
    		border: none;
    		color: white;
    		text-align: center;
    		text-decoration: none;
    		display: inline-block;
    		font-size: 16px;
    		cursor: pointer;
            width:70%;
            height:44px;
            margin:auto;
            margin-top:50px;
            border-radius:5px;
            box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
		}
          .footer {
    text-align: center;
    font-size: 12px;
    color: #666666;
    /* position: fixed; */
    bottom: 0;
    width: 100%;
          }
		</style>
	</head>
		
	<body>
      <div class="content">
        <input type="text" name="idcard" placeholder="请输入身份证号码查询" class="layui-input">
        <label>说明：</label>
        <label>1.为方便查询多次检测的结果，此功能优化为输入身份证号进行查询</label>
        <label>2.两次核酸样本采样，请间隔24小时</label>
        <label>3.结果仅供参考，具体以官方检测机构出具的证明为准</label>
        <label>4.核酸检测只显示近三个月的结果</label>
		<button class="button" id="sub_btn">查询</button>
      </div>
		<script>
		layui.use(['layer', 'jquery'], function(){
		  var layer = layui.layer
		  ,$ = layui.jquery;
		  
			$(document).ready(function(){
				var loadIndex;
              	var isClick = true;
				$('#sub_btn').click(function(){
                  	if(isClick){
                      	isClick = false;
                    	var idcard = $('input[name="idcard"]').val();
                        if(typeof idcard == "undefined" || idcard == null || idcard == ""){
                            layer.msg('请输入身份证号码',{icon:2});
                          	isClick = true;
                        }else{
                            var reg=/(^\d{15}$)|(^\d{17}(x|X|\d)$)/;
                            if(!reg.test(idcard)){
                                layer.msg('请输入正确的身份证号码',{icon:2});
                              	isClick = true;
                            }else{
                              	$('input[name="idcard"]').val('');
                                window.location.href = "http://user.city1000.cn:9999/weixin/wechat/h5/redirectSomeWhere?url=http://hesuan.city1000.cn/check_result2.html&data="+idcard;
                            }
                        }  
                    }
				})
			});
		});
		</script>
	</body>

</html>
